Velocity (7) -- Advanced velocity usage and advanced velocity usage1. truncate part of the field substring
1 original string: $! Ag. tagValue, which may be very long, must be truncated when the front-end page is displayed. 2 # set ($ str = $! Ag. tagValue) 3 4 # if ($ str. length ()> 30) 5 # set ($ str = $ str. substring (0, 30) 6 $ str... 7 # else8 $! Ag. tagVal
Velocity, velocity. js
Velocity is a java-based template engine that allows anyone to reference objects defined by java code simply using the template language. As a relatively complete template engine, Velocity has powerful functions, but it also increases application complexity.
I. Basic syntax
1. "#" is the sc
Basic use of velocity and basic use of velocity
Basic usage requirements of velocity: Master jstl Technology of jsp, because the usage of velocity is very similar to that of jstl. There is little difference in syntax, but the velocity example is obviously less than jstl, and
With velocity, many of the original tags are unusable and must be done with velocity tools, the latest version of Velocity Tools is 2.0, and here are some considerations for velocity tools:1. Integration issues with Spring MVC 3.x/4.xSpring 3.x/4.x only supports 1.3.x velocity
Today, after you have upgraded some of the dependent jar versions to start a project, Some of the definitions in velocity in the COMMON.VM variables actually become null, did not include in the cause, and the environment is OK, after counter-check, and finally found that the Velocity-tools-beta1.jar upgrade to Velocity-tools.jar for ,
Use velocity tips and velocity tips
Due to the company's needs, I used the velocity template for file generation. Here are some tips for using the velocity template:
1. when intercepting a string, note that (1) Use. length () is used to obtain the string length. (2) it is best to replace "-1" in the form of "+ (-1)",
Before using JSP development, you can easily get to the root project name through request, now change to use velocity rendering view, because it is not dependent on the environment of some classes such as Servlet,request, and the Web project's root project name is not written dead, need to get dynamically, At this time what to do, tried the online said a lot of ways, summed up the experience.The first type: (failure)
Configure the following i
Features of the table in HBaseBig: A table can be made up of tens of billions of rows, millions of columns (Riedo, insertion slows down)
Column-oriented: Column (family)-oriented storage and permission control, column (family) Independent retrievalSparse: For columns that are empty (null) and do not occupy storage space, the table can be designed to be very sparse.Multiple Versions: The data in each cell can be made up of multiple versions, and by default the version number is automatically ass
Basic Mode
When you use velocity in an application or a servlet, or anywhere else, it is usually handled as follows: Initialize velocity. Velocity can use two modes as a singleton mode for "separate runtime instances" (described in the following section), and you only need to initialize them once. Create a Context object (this is what is described later). Add you
JS Struts Recipes's co-author George Franciscus takes you step-by-step through integrating the Velocity template engine into the Struts application. The result is a fast, flexible JSP replacement with all the conveniences you can expect from Struts.
Java? Server Page (JSP) technology is so pervasive that people forget that there are other options when creating Web pages. But recently, some developers have turned to the template engine to gain fle
Velocity, literally translated as: speed, speed, and speed, used in web development, there may not be many people who have used it, most of them basically know and are using struts, in the end, how does velocity and Struts (taglib and tiles) contact? In terms of technology, velocity is more advanced than struts (taglib and tiles).
Many people have seen or learned velocity, the name literal translation: speed, rate, rapid, used in web development, the use of people may not be many, most of the basic know and in the use of struts, in the end velocity and struts how to contact, how to see velocity? Let's try it out, to understand the concept of velocity
Velocity, the name literally translated as: speed, velocity, rapid, used in web development, used by people may not be many, most basic know and in use struts, exactly how velocity and struts (taglib and tiles) how to contact? Technically, the velocity is more advanced than struts struts (taglib and tiles), and it is t
Transferred from: http://blog.csdn.net/fasttalk/article/details/398059Velocity, the name literally translated as: speed, velocity, rapid, used in web development, used by people may not be many, most basic know and in use struts, exactly how velocity and struts (taglib and tiles) how to contact? Technically, the velocity is more advanced than struts struts (tagli
The design idea of the velocity Technology Survey template engine was first proposed by webmacro and applied to a famous search engine www.altavista.com. Later, this idea was gradually adopted by the Apache development team and proposed as a sub-project. This is the current velocity.
What is velocity?Velocity is a Java
Original address: http://www.ibm.com/developerworks/cn/java/j-lo-velocity1/ Velocity is a Java-based template engine that allows anyone to simply use the template language to refer to objects defined by Java code, thus separating the interface from the Java code so that the interface designer can synchronize with the Java Program developer to develop a we that follows the MVC architecture b site. But in the practical application,
Reprint: http://www.ibm.com/developerworks/cn/java/j-lo-velocity1/Velocity is a Java-based template engine that allows anyone to simply use the template language to refer to objects defined by Java code, thus separating the interface from the Java code so that the interface designer can synchronize with the Java Program developer to develop a we that follows the MVC architecture b site. But in the practical application,
Using the Velocity templateVelocity is an easy-to-use template language for Java applications. The velocity template does not have any Java code, which makes it easy for both non-developers and developers to understand. That's what Velocity's user manual says: "Velocity separates Java code from Web pages, makes it easier to maintain in the long run using a Web si
Velocity is a Java-based template engine. It allows web page designers to refer to methods defined in Java code. Web designers can work in parallel with Java programmers to develop MVC-mode Web sites, which means that Web page designers can focus only on creating well-designed sites, and programmers can focus only on writing top-tier code. Velocity separates Java code from Web pages, making Web sites more m
Note:
Velocityjs in npm contains the name from the original velocity. changed js to velocityjs and felt require ("velocity. js ") is not easy to understand, so the name is changed. Versions later than 0.3.0 are all updated under velocityjs.
View the latest version
$npminfovelocityjsversion
Velocity. js is the javascript Implementation of the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.